1. POR vs EXP color in trend charts:
    • add col for POR or exp
    • group by por and exp, then plot each group on same figure
  2. median value trend charts for POR -
    • new df with median values by por and exp
  3. add yline for solution change, target change, POR change, etc
  4. plot by exp # instead of date
  5. filter by meas no eff
  6. fulltrends df with historical process, ivt, exp, xrf, etc
In [2]:
from IPython.display import Javascript, display
from ipywidgets import widgets

def run_all(ev):
    display(Javascript('IPython.notebook.execute_cells_below()'))

button = widgets.Button(description="Click here to update tables + charts:")
button.on_click(run_all)
display(button)
In [3]:
import pandas as pd
import numpy as np
import sqlalchemy as sa
import glob
import os
import sys
import matplotlib.pyplot as plt
import matplotlib.pylab as pylab
import plotly.plotly as py
from plotly.graph_objs import *
import datetime
%matplotlib inline  
#%pylab inline
pylab.rcParams['figure.figsize'] = (15, 25)
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)

import qgrid
qgrid.nbinstall(overwrite=True) 

engine = sa.create_engine('mysql+pymysql://root:@localhost/rsi?charset=utf8')
conn = engine.connect()

update tables and send to db

process log
In [4]:
#updates process table in db and creates process df
df = pd.read_excel("//SERVER01/Public/ProcessingData_6in_R&DLine.xlsx", header=0)
df.to_sql('process', conn, if_exists='replace', index = True, index_label='process_index')

#del processdf
processdf = df
#qgrid.show_grid(processdf)
In [5]:
#update once a week
process_df_list = []
p = "//SERVER01/Public/Processing Data and Experiment Logs Archives and Backup/ProcessingData_6in_R&DLine_*.xlsx"
processFiles = glob.glob(p)

for i,f in enumerate(processFiles):
    sys.stdout.write('\r')
    sys.stdout.write(str(i))
    sys.stdout.flush()
    
    df_1 = pd.read_excel(f, header = 0)
    process_df_list.append(df_1)

process_df_list = pd.concat(process_df_list)

oldp = pd.DataFrame(process_df_list)
oldp1 = oldp.reindex_axis(df.columns, axis=1)

#del processdf
fprocessdf = pd.concat([oldp1, df])
fprocessdf
fprocessdf.to_sql('fullprocess', conn, if_exists='replace', index = True, index_label='fullprocess_index')
11
experiment log
In [6]:
#creates expdf
df2 = pd.read_excel("//SERVER01/Public/ExperimentLog.xlsx", header=0, parse_cols=[0,1,2,3,4,5,6,8])

#df2.dropna(axis=1, how='all') #remove na col

#df2["Experiment_ID"] = df2["Experiment_ID"].str.replace("Exp_","").astype(float)
#df2["Experiment_ID"] = df2["Experiment_ID"].str.replace("EXP_","").astype(float)

df2['Experiment_ID'] = df2['Experiment_ID'].str.replace("Exp_","")
df2['Experiment_ID'] = df2['Experiment_ID'].str.replace("EXP_","")
df2['Experiment_ID'] = df2['Experiment_ID'].astype(float)

#del expdf
expdf = df2

#def mask(df, f):
#    return df[f(df)]
#def mask(df, key, value):
#    return df[df[key] == value]
#df.mask('A', 1).mask('D', 6)

#add POR or EXP classification
expdf['POR'] = 'EXP'
mask1 = expdf.Split1.str.contains('.*POR.*', na=False)
expdf.loc[:,'POR'][mask1] = 'POR'
#expdf.mask('POR',)
mask2 = expdf.Split2.str.contains('.*POR.*', na=False)
expdf.loc[:,'POR'][mask2] = 'POR'
mask3 = expdf.Split3.str.contains('.*POR.*', na=False)
expdf.loc[:,'POR'][mask3] = 'POR'
mask4 = expdf.Description.str.contains('.*POR.*', na=False)
expdf.loc[:,'POR'][mask4] = 'POR'

#updates exp log in db
expdf.to_sql('exp', conn, if_exists='replace', index = True, index_label='exp_index')
expdf.head()
#expdf.dtypes
c:\anaconda3\lib\site-packages\ipykernel\__main__.py:25: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:28: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:30: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:32: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

Out[6]:
Sample ID Experiment_ID Description Date (IVT measure) Split1 Split2 Split3 Comments POR
0 39H6F 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR
1 39H6G 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 Non diluted - 34% NaN NaN NaN EXP
2 39H7A 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 Non diluted - 34% NaN NaN NaN EXP
3 39H7B 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR
4 39H7C 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR
In [7]:
#push to sql once a wk
e = pd.read_excel("//SERVER01/Public/Processing Data and Experiment Logs Archives and Backup/ExperimentLog - Jun05.xlsx", header=0, parse_cols=[0,1,2,4,5,6,7])
e1 = e.reindex_axis(df2.columns, axis=1)
 
e1['Experiment_ID'] = e1['Experiment_ID'].str.replace("Exp_","")
e1['Experiment_ID'] = e1['Experiment_ID'].str.replace("EXP_","")
e1['Experiment_ID'] = e1['Experiment_ID'].str.replace("exp_","")
e1['Experiment_ID'] = e1['Experiment_ID'].astype(float)
                  
#add POR or EXP classification
e1['POR'] = 'EXP'
mask1 = e1.Split1.str.contains('.*POR.*', na=False)
e1.loc[:,'POR'][mask1] = 'POR'
mask2 = e1.Split2.str.contains('.*POR.*', na=False)
e1.loc[:,'POR'][mask2] = 'POR'
mask3 = e1.Split3.str.contains('.*POR.*', na=False)
e1.loc[:,'POR'][mask3] = 'POR'
mask4 = e1.Description.str.contains('.*POR.*', na=False)
e1.loc[:,'POR'][mask4] = 'POR'
                  
fullexpdf = pd.concat([e1, expdf])
fullexpdf.to_sql('fullexp', conn, if_exists='replace', index = True, index_label='fexp_index')
fullexpdf.head()
c:\anaconda3\lib\site-packages\ipykernel\__main__.py:13: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:15: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:17: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:19: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

Out[7]:
Sample ID Experiment_ID Description Date (IVT measure) Split1 Split2 Split3 Comments POR
0 32I59 1 Optimize CuI process to eliminate JL(V) and in... NaN CuI 0.250L/min (POR) CuI Anneal 10 min. (POR) CuI Anneal 170°C (POR) NaN POR
1 32J07 1 Optimize CuI process to eliminate JL(V) and in... NaN CuI 0.250L/min (POR) CuI Anneal 10 min. (POR) CuI Anneal 170°C (POR) NaN POR
2 32J19 1 Optimize CuI process to eliminate JL(V) and in... NaN CuI 0.250L/min (POR) CuI Anneal 10 min. (POR) CuI Anneal 170°C (POR) NaN POR
3 32I63 1 Optimize CuI process to eliminate JL(V) and in... NaN CuI 0.250L/min (POR) CuI Anneal 15 min. CuI Anneal 170°C (POR) NaN POR
4 32J10 1 Optimize CuI process to eliminate JL(V) and in... NaN CuI 0.250L/min (POR) CuI Anneal 15 min. CuI Anneal 170°C (POR) NaN POR
CdTe logs (inc)
In [8]:
#updates ED log table in db
#ED_data_list = []
#efiles = \\6in-cdte1\Users\reelsolar\Documents\CdTe Log Data\*.xls
#(time, soln temp, chuck temp(deprecated), flow rate, side + pin currents)
#e1files = \\6in-cdte1\Users\reelsolar\Documents\CdTe Log Data\*P.xls
#(time, soln temp, flow rate, pin currents)


#EDFiles = allFiles = glob.glob("//ED3-pc/Users/ReelSolar/Documents/CdTe Log Data/*.xls")
#for i,f in enumerate(allFiles):
#    sys.stdout.write('\r')
#    sys.stdout.write(str(i))
#    sys.stdout.flush()
    
#    df4 = pd.read_excel(f, sep='\t', header = 0, skiprow=1)
#    ED_data_list.append(df4)
    
#ED_data_list = pd.concat(ED_data_list)
#filename as index, 
#print('Done.')
In [9]:
#ED info
ed = pd.read_csv("//SERVER01/Public/SPC/Database/ED.csv", header=0, skip_blank_lines=True)
ed.to_sql('ed', conn, if_exists='replace', index = True, index_label='ed_index')
print('Done.')
Done.
In [10]:
#XRF info
xrf = pd.read_csv("//SERVER01/Public/SPC/Database/XRF.csv", header=0, skip_blank_lines=True)
xrf.to_sql('xrf', conn, if_exists='replace', index = True, index_label='xrf_index')
print('Done.')
Done.
Sencera log
In [11]:
#updates sencera log table in db and creates senceradf
p1 = "//SERVER01/Public/Process Modules/08 - Sputter/Sencera MoNAl Process Monitor.xlsx"
df5 = pd.read_excel(p1, header=0, parse_cols=[0,1,2,3,9,10,11,12,13,16,17,18,19,20,22,23,24,26,27])
df5.to_sql('sencera', conn, if_exists='replace', index = True, index_label='sencera_index')

#sencera = df5[df5['Date_tm'].apply(lambda x: type(x)==datetime.datetime)==True]
sencera = df5
sencera.tail()
print('Done.')
Done.
full (DIV + LIV) IVT fits
In [12]:
#updates IVT data to send to db

#----------append routine, only use if # of cols vary between ivt files. if not, concat -------#
#path =r"//rsi-ivt-pc/Users/Reel Solar/IV curves/" can use below instead of full path, path + ""
#df3 = pd.concat(pd.read_csv(f) for f in allFiles)
#len(allFiles) 10876 02/22/16
#IVT_data = pd.DataFrame()
#for i,f in enumerate(allFiles):
#    sys.stdout.write('\r')
#    sys.stdout.write(str(i))
#    sys.stdout.flush()
    
#    df3 = pd.read_csv(f, sep='\t', header = 0)
#    IVT_data = IVT_data.append(df3, ignore_index=True)


IVT_data_list = []
allFiles = glob.glob("//rsi-ivt-pc/Users/Reel Solar/IV curves/*fit_parameters.txt")
for i,f in enumerate(allFiles):
    sys.stdout.write('\r')
    sys.stdout.write(str(i))
    sys.stdout.flush()
    
    df3_2 = pd.read_csv(f, sep='\t', header = 0, parse_dates=['Date_tm'])
    IVT_data_list.append(df3_2)
    #IVT_data3 = pd.concat(IVT_data_list, ignore_index=True)
    
%time IVT_data_list = pd.concat(IVT_data_list)
print('Done.')
12666Wall time: 27 s
Done.
In [13]:
#modifies ivtdf, sets datetime info 
ivtdf = IVT_data_list.drop('n', 1) #remove null and inf cols
ivtdf = IVT_data_list.drop('IO_nA', 1)
ivtdf = ivtdf.drop('fit_check', 1)
ivtdf = ivtdf.drop('fit_res_var',1)

#panda i/o to sql has problems with inf values, routine below replaces these with nan ==> None in SQL:
#ivtdf = ivtdf.where(pd.notnull(ivtdf), None)
ivtdf = ivtdf.replace([np.inf, -np.inf], np.nan)

ivtdf = ivtdf[ivtdf['Date_tm'].apply(lambda x: type(x)==datetime.datetime)==True]
ivtdf = ivtdf[~ivtdf['Sample_ID'].str.contains('.*PHILIP.*', na = False)]
ivtdf['Rsh_Ohm'] = ivtdf['Rsh_Ohm'].astype(float)
#ivtdf['Rsh'] = ivtdf['Rsh_Ohm']/ivtdf['Cell_Count'] fix gives inf

#def shunt(row):
#    if row['Rsh'] <=50.0:
#        return 1
#ivtdf['shunt_count'] = ivtdf.apply(lambda row: shunt(row), axis=1)

ivtdf.info() #confirm removal/ replacement
<class 'pandas.core.frame.DataFrame'>
Int64Index: 684902 entries, 0 to 143
Data columns (total 28 columns):
Cell_Area_mm2    684901 non-null float64
Cell_Count       684081 non-null float64
Cell_no          684902 non-null float64
Comment          142425 non-null object
Current_Step     684902 non-null object
Date_tm          684902 non-null object
Eff              821 non-null float64
Efficiency       344486 non-null float64
FF               821 non-null float64
FillFactor       346255 non-null float64
I0_nA            293984 non-null object
Iph_mA           294151 non-null object
Isc_mA           347801 non-null float64
Measurement      684902 non-null object
NumCells         821 non-null float64
Pmp_fit_ratio    150444 non-null float64
Pmp_mW           347721 non-null float64
R_squared        290509 non-null object
Roc_Ohm          347611 non-null float64
Rs_Ohm           672104 non-null float64
Rsc_Ohm          347607 non-null float64
Rsh_Ohm          672372 non-null float64
Sample_ID        684902 non-null object
Temp_C           684901 non-null float64
User             684476 non-null object
Vmp_V            347801 non-null float64
Voc_V            347140 non-null float64
n                294019 non-null float64
dtypes: float64(19), object(9)
memory usage: 151.5+ MB
In [14]:
#sends ivt data to sql db
%time ivtdf.to_sql('ivt', conn, if_exists='replace', index = True, index_label='ivt_index')
print('Done.')
Wall time: 1min 57s
Done.
In [15]:
#creates ivtdfmod and module trends dfs
ivtdfmod = pd.DataFrame(ivtdf[ivtdf.Cell_Count > 19])
#list(ivtdfmod.columns.values)

#del mod_trends
ivtdfmod['Rsh_Ohm'] = ivtdfmod['Rsh_Ohm'].astype(float)
mod_trends = pd.merge(left=expdf, right=ivtdfmod, left_on='Sample ID', right_on='Sample_ID')
mod_trends.sort_values(by='Experiment_ID')
mod_trends = mod_trends.replace([np.inf, -np.inf], np.nan)

mod_trends['percentEff'] = mod_trends['Efficiency']*100
mod_trends['percentFF'] = mod_trends['FillFactor']*100
mod_trends['modVoc'] = mod_trends['Voc_V']/mod_trends['Cell_Count']
mod_trends['modJsc'] = (mod_trends['Isc_mA']/mod_trends['Cell_Area_mm2'])*100
mod_trends['modRs'] = mod_trends['Roc_Ohm']/mod_trends['Cell_Count']
mod_trends['modRsh'] = mod_trends['Rsc_Ohm']/mod_trends['Cell_Count']

def mod_shunt(row):
    if row['modRsh'] <=50.:
        return 1
    
mod_trends['shunt_count'] = mod_trends.apply(lambda row: mod_shunt(row), axis=1)
#mod_trends.sort_values(by='Date (IVT Measure)')

mod_trends = mod_trends.replace([np.inf, -np.inf], np.nan)
mod_trends.head() #confirms accurate mod measurements
Out[15]:
Sample ID Experiment_ID Description Date (IVT measure) Split1 Split2 Split3 Comments POR Cell_Area_mm2 Cell_Count Cell_no Comment Current_Step Date_tm Eff Efficiency FF FillFactor I0_nA Iph_mA Isc_mA Measurement NumCells Pmp_fit_ratio Pmp_mW R_squared Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Sample_ID Temp_C User Vmp_V Voc_V n percentEff percentFF modVoc modJsc modRs modRsh shunt_count
0 39H6F 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR 6.273 23 1 NaN IV_TEST 2014-10-03 16:43:00 NaN NaN NaN NaN NaN NaN NaN Dark NaN NaN NaN NaN NaN NaN NaN NaN 39H6F 27.298789 HP NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 39H6F 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR 6.273 23 1 NaN IV_TEST 2014-10-03 16:44:00 NaN NaN NaN NaN NaN NaN NaN Dark NaN NaN NaN NaN NaN NaN NaN NaN 39H6F 28.756583 HP NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
2 39H6F 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR 627.300 23 1 NaN IV_TEST 2014-10-03 16:44:00 NaN 0.099741 NaN 0.542762 NaN NaN 154.005353 Light NaN NaN 1439.054850 NaN 27.322773 NaN 1559.617300 NaN 39H6F 28.834435 HP 12.232767 17.215998 NaN 9.9741 54.2762 0.748522 24.550511 1.187947 67.809448 NaN
3 39H6F 256 AQ5000 Photoresist 27% vs. 34% solids 2014-06-13 00:00:00 POR - 27% NaN NaN NaN POR 627.300 23 1 NaN IV_TEST 2014-10-03 16:45:00 NaN 0.099454 NaN 0.559052 NaN NaN 151.846239 Light NaN NaN 1434.911937 NaN 25.811509 NaN 22421.341523 NaN 39H6F 31.149857 HP 11.872947 16.903206 NaN 9.9454 55.9052 0.734922 24.206319 1.122240 974.840936 NaN
4 39H6F 305 Enki AR Coating post CdTe 2014-10-03 00:00:00 AR Coat post PR FoilAnneal NaN NaN EXP 6.273 23 1 NaN IV_TEST 2014-10-03 16:43:00 NaN NaN NaN NaN NaN NaN NaN Dark NaN NaN NaN NaN NaN NaN NaN NaN 39H6F 27.298789 HP NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
In [16]:
#creates cell trends df

#del cell_trends
ivtdfcell = pd.DataFrame(ivtdf[ivtdf.Cell_Count == 1 ])

ivtdfcell['Rsh_Ohm'] = ivtdfcell['Rsh_Ohm'].astype(float)
cell_trends = pd.merge(left=expdf, right=ivtdfcell, left_on='Sample ID', right_on='Sample_ID')
#trends.sort_values(by='POR')
cell_trends.sort_values(by='Date_tm')
#trends.tail(50)

cell_trends['percentEff'] = cell_trends['Efficiency']*100
cell_trends['percentFF']= cell_trends['FillFactor']*100
cell_trends['cellVoc'] = cell_trends['Voc_V']/cell_trends['Cell_Count']
cell_trends['cellJsc']= (cell_trends['Isc_mA']/cell_trends['Cell_Area_mm2'])*100
cell_trends['cellRs'] = cell_trends['Rs_Ohm']/cell_trends['Cell_Count']
cell_trends['cellRs_norm'] = (cell_trends['Rs_Ohm']/cell_trends['Cell_Count'])*(cell_trends['Cell_Area_mm2']/100)
cell_trends['cellRsh'] = cell_trends['Rsc_Ohm']/cell_trends['Cell_Count']
cell_trends['cellRsh_norm'] = (cell_trends['Rsc_Ohm']/cell_trends['Cell_Count'])*(cell_trends['Cell_Area_mm2']/100)

#for i in len(cell_trends['cellRs']):
#    if mask1 = expdf.Split1.str.contains('.*POR.*', na=False):
#        expdf.loc[:,'POR'][mask1] = 'POR'
#    else:

def cell_shunt(row):
    if row['cellRsh'] <=50.:
        return 1
    
cell_trends['shunt_count'] = cell_trends.apply(lambda row: cell_shunt(row), axis=1)
cell_trends = cell_trends.replace([np.inf, -np.inf], np.nan)
cell_trends.tail()
#list(cell_trends.columns.values)
Out[16]:
Sample ID Experiment_ID Description Date (IVT measure) Split1 Split2 Split3 Comments POR Cell_Area_mm2 Cell_Count Cell_no Comment Current_Step Date_tm Eff Efficiency FF FillFactor I0_nA Iph_mA Isc_mA Measurement NumCells Pmp_fit_ratio Pmp_mW R_squared Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Sample_ID Temp_C User Vmp_V Voc_V n percentEff percentFF cellVoc cellJsc cellRs cellRs_norm cellRsh cellRsh_norm shunt_count
374011 48Y1D 674 CdS pressure 2016-06-06 00:00:00 Materion CdS, 10 mT (36 sccm , POR) 8 samples in Cu anneal tool2-1 NaN POR 565 1 12 NaN IV_TEST 2016-06-06 18:47:00 NaN 0.151980 NaN 0.715713 NaN NaN 146.909187 Light NaN NaN 85.868964 NaN 0.883903 0.517827 102.067372 176.866021 48Y1D 26.923976 AH 0.675220 0.816674 NaN 15.1980 71.5713 0.816674 26.001626 0.517827 2.925723 102.067372 576.680652 NaN
374012 48Y1D 674 CdS pressure 2016-06-06 00:00:00 Materion CdS, 10 mT (36 sccm , POR) 8 samples in Cu anneal tool2-1 NaN POR 565 1 18 NaN IV_TEST 2016-06-06 18:47:00 NaN 0.151579 NaN 0.716206 NaN NaN 146.345447 Light NaN NaN 85.642130 NaN 0.884275 0.514661 298.063684 105.647828 48Y1D 27.080042 AH 0.648010 0.817091 NaN 15.1579 71.6206 0.817091 25.901849 0.514661 2.907835 298.063684 1684.059815 NaN
374013 48Y1D 674 CdS pressure 2016-06-06 00:00:00 Materion CdS, 10 mT (36 sccm , POR) 8 samples in Cu anneal tool2-1 NaN POR 565 1 11 NaN IV_TEST 2016-06-06 18:47:00 NaN 0.153082 NaN 0.713647 NaN NaN 148.207942 Light NaN NaN 86.491431 NaN 0.825139 0.505157 398.758024 119.365737 48Y1D 27.231372 AH 0.662041 0.817746 NaN 15.3082 71.3647 0.817746 26.231494 0.505157 2.854137 398.758024 2252.982836 NaN
374014 48Y1D 674 CdS pressure 2016-06-06 00:00:00 Materion CdS, 10 mT (36 sccm , POR) 8 samples in Cu anneal tool2-1 NaN POR 565 1 23 NaN IV_TEST 2016-06-06 18:47:00 NaN 0.000000 NaN NaN NaN NaN 0.000000 Light NaN NaN 0.000000 NaN 0.056516 0.171614 0.119464 0.129117 48Y1D 27.397998 AH 0.000000 NaN NaN 0.0000 NaN NaN 0.000000 0.171614 0.969619 0.119464 0.674972 1
374015 48Y1D 674 CdS pressure 2016-06-06 00:00:00 Materion CdS, 10 mT (36 sccm , POR) 8 samples in Cu anneal tool2-1 NaN POR 565 1 16 NaN IV_TEST 2016-06-06 18:47:00 NaN 0.151351 NaN 0.709976 NaN NaN 147.376047 Light NaN NaN 85.513353 NaN 0.829064 0.505941 36.876274 99.723587 48Y1D 27.540093 AH 0.639592 0.817266 NaN 15.1351 70.9976 0.817266 26.084256 0.505941 2.858567 36.876274 208.350948 1
In [17]:
#creates trends df = ivtdf + expdf + processdf

#del trends
trends = pd.merge(pd.merge(expdf, processdf), ivtdf, left_on='Sample ID', right_on='Sample_ID')

trends['percentEff'] = trends['Efficiency']*100
trends['percentFF'] = trends['FillFactor']*100
trends['Voc'] = trends['Voc_V']/trends['Cell_Count']
trends['Jsc'] = (trends['Isc_mA']/trends['Cell_Area_mm2'])*100
trends['Rs'] = trends['Roc_Ohm']/trends['Cell_Count']
trends['Rsh'] = trends['Rsc_Ohm']/trends['Cell_Count']

trends['CdS Thickness (nm)'][trends['CdS Thickness (nm)'] == ''] = None
trends['CdS Thickness (nm)'][trends['CdS Thickness (nm)'] == ' '] = None 
trends['CdS Thickness (nm)'][trends['CdS Thickness (nm)'] == '?'] = None 
trends['CdS Thickness (nm)'] = trends['CdS Thickness (nm)'].astype(float)
trends['CdTe Thickness in Angstroms'][trends['CdTe Thickness in Angstroms'] == ''] = None
trends['CdTe Thickness in Angstroms'][trends['CdTe Thickness in Angstroms'] == ' '] = None
trends['CdTe Thickness in Angstroms'] = trends['CdTe Thickness in Angstroms'].astype(float)

trends = trends.replace([np.inf, -np.inf], np.nan)

#trends.to_sql('trends', conn, if_exists='replace', index = True, index_label='trends_index')


#trends.tail()
c:\anaconda3\lib\site-packages\ipykernel\__main__.py:13: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:14: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:15: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:17: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

c:\anaconda3\lib\site-packages\ipykernel\__main__.py:18: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

In [18]:
#cds thickness trends

#del cds
#df = df.apply(lambda x: x.str.strip()).replace('', np.nan)
#cds = trends[pd.notnull(trends['CdS Thickness (nm)'])]
#cds = cds.apply(lambda x: x.str.strip()).replace('?', np.nan)

cds = pd.DataFrame(trends[trends.Cell_Count >= 22])
cds = cds[~cds['Measurement'].str.contains('.*Dark.*', na = False)]

cds = cds.replace([np.inf, -np.inf], np.nan)

cds = pd.merge(cds, xrf, left_on='Sample ID', right_on='Sample')

cds['CdTe_Tool'] = '1'
mask1 = cds["CdTe 2 Tool"].str.contains('.*TANK.*', na=False)
cds.loc[:,'CdTe_Tool'][mask1] = '2'


#cds.tail(20)

#from IPython.display import display
#grid = qgrid.QGridWidget(df=cds)
#display(grid)

qgrid.show_grid(cds, show_toolbar=True, grid_options={'forceFitColumns': False, 'defaultColumnWidth': 150})
c:\anaconda3\lib\site-packages\ipykernel\__main__.py:17: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

In [19]:
#particulate data
f = '//rsi-ivt-pc/Users/Reel Solar/Desktop//Particulate Analysis.xlsx'
p = pd.read_excel(f, 'Sheet1')
p.info()

p.to_sql('particle', conn, if_exists='replace', index = True, index_label='particle_index')
<class 'pandas.core.frame.DataFrame'>
Int64Index: 347148 entries, 0 to 347147
Data columns (total 4 columns):
DATE         347148 non-null datetime64[ns]
TIME         347148 non-null object
SMALL 0.5    347148 non-null int64
LARGE 2.5    347148 non-null int64
dtypes: datetime64[ns](1), int64(2), object(1)
memory usage: 13.2+ MB
In [20]:
#SQL trend outs
cell_trends.to_sql('cells', conn, if_exists='replace', index = True, index_label='cells_index')
mod_trends.to_sql('mods', conn, if_exists='replace', index = True, index_label='mods_index')
trends.to_sql('trends', conn, if_exists='replace', index = True, index_label='trends_index')
cds.to_sql('cds', conn, if_exists='replace', index = True, index_label='cds_index')

import time 
now = time.strftime("%c")
print ("Updated at: %s"  % now )
Updated at: Tue Jun  7 08:44:49 2016

if you want to output to Excel:

In [21]:
#exports full trends df to excel
from xlsxwriter.utility import xl_rowcol_to_cell
writer_orig = pd.ExcelWriter('db.xlsx', engine='xlsxwriter')
%time cds.to_excel(writer_orig, index=False, sheet_name='all')
writer_orig.save()
print('Exported to db.xlsx.')
Wall time: 25 s
Exported to db.xlsx.

trend charts

In [22]:
from IPython.display import Javascript, display
from ipywidgets import widgets

def run_all(ev):
    display(Javascript('IPython.notebook.execute_cells_below()'))

button = widgets.Button(description="Click here to update tables + charts:")
button.on_click(run_all)
display(button)
In [23]:
##module eff, FF, Voc, Jsc vs time
plt.figure(2)
plt.figure(figsize=(20,10))
plt.subplot(211)
plt.plot(ivtdfmod['Date_tm'], ivtdfmod['Efficiency']*100, '+')
plt.xlim([datetime.date(2016, 1, 1), datetime.date(2016, 6, 15)])
plt.ylim(8, 17)
#plt.title("6\" progress -- Eff")
#plt.xlabel('date')
plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.ylabel('Module Efficiency')
#plt.show()

plt.subplot(212)
plt.plot(ivtdfmod['Date_tm'], ivtdfmod['FillFactor']*100, 'g+')
plt.xlim([datetime.date(2016, 1, 1), datetime.date(2016,6,15)])
plt.ylim(55, 80)
#plt.title("6\" progress -- FF")
#plt.xlabel('date')
plt.ylabel('FF')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.show()
<matplotlib.figure.Figure at 0x20832813d30>
In [24]:
plt.figure(3)
plt.figure(figsize=(20,15))
plt.subplot(311)
plt.plot(mod_trends['Date_tm'], mod_trends['modJsc'], 'r+')
plt.xlim([datetime.date(2016, 1, 1), datetime.date(2016,6,15)])
plt.ylim(20, 28)
#plt.title("6\" progress -- Jsc")
#plt.xlabel('date')
plt.ylabel('Jsc [mA/cm^2]')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
#plt.show()

plt.subplot(312)
plt.plot(mod_trends['Date_tm'], mod_trends['modVoc'], '+m')
plt.xlim([datetime.date(2016, 1, 1), datetime.date(2016,6,15)])
plt.ylim(0.78, .85)
#plt.title("6\" progress -- Voc")
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.xlabel('date')
plt.ylabel('Voc [V]')
plt.show()
<matplotlib.figure.Figure at 0x208327ba940>
In [25]:
ivtdfmod['Rsh_Ohm'] = ivtdfmod['Rsh_Ohm'].astype(float)

#ivtdfmod['mean_Rsh'] = ivtdfmod['Rsh_Ohm'].mean
#ivtdfmod['mean_Rsh']

plt.figure(3)
plt.figure(figsize=(20,15))
plt.subplot(311)
plt.plot(ivtdfmod['Date_tm'], ivtdfmod['Rs_Ohm']/22, 'k+')
plt.xlim([datetime.date(2016,1, 1), datetime.date(2016,6,15)])
plt.ylim(0, 6)
#plt.title("6\" progress -- Eff")
#plt.xlabel('date')
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.ylabel('Rs/cell [Ohm]')
#plt.show()

plt.subplot(312)
plt.plot(ivtdfmod['Date_tm'], ivtdfmod['Rsh_Ohm']/22, 'y+')
plt.xlim([datetime.date(2016,1, 1), datetime.date(2016,6,15)])
plt.ylim(1e0, 1e8)
#plt.title("6\" progress -- Eff")
#plt.xlabel('date')
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.ylabel('Rsh/cell [Ohm]')
plt.yscale('log')
plt.show()
<matplotlib.figure.Figure at 0x208327cd5c0>

efficiency + FF

In [26]:
import seaborn as sns
flatui = ["#3498db", "#e74c3c", "#2ecc71", "#95a5a6", "#34495e", "#9b59b6"]
sns.set(style='ticks')
sns.set_palette(flatui)
sns.set_context("notebook", font_scale=1.5,)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper
#plt.figure(figsize=(20, 20))

#_cond = ['POR', 'EXP']

#trends['POR'] = trends['POR'].apply(str)

fg = sns.FacetGrid(mod_trends, hue='POR', size= 9, aspect=2.3)#, hue_kws=dict(marker=["^", "v"]))
fg.map(plt.scatter, 'Experiment_ID', 'percentEff', alpha=.7,)
plt.xlim(560,680)
plt.ylim(12, 17)
plt.axhline(15.5, color='k', linestyle='--')
plt.axhline(14.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg1 = sns.FacetGrid(mod_trends, hue='POR', size= 9, aspect=2.3)
fg1.map(plt.scatter, 'Experiment_ID', 'percentFF', alpha=.7)
plt.xlim(560,680)
plt.ylim(50, 80)
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()


#g = sns.FacetGrid(tips, col="time",  hue="smoker")
#>>> g = (g.map(plt.scatter, "total_bill", "tip", edgecolor="w")
#...       .add_legend())
Out[26]:
<matplotlib.legend.Legend at 0x2083a6e73c8>
In [27]:
flatui = ["#3498db", "#e74c3c", "#2ecc71", "#95a5a6", "#34495e", "#9b59b6"]
sns.set(style='ticks')
sns.set_palette(flatui)
sns.set_context("notebook", font_scale=1.5,)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper
#plt.figure(figsize=(20, 20))

#_cond = ['POR', 'EXP']

#trends['POR'] = trends['POR'].apply(str)

fg = sns.FacetGrid(cell_trends, hue='POR', size= 9, aspect=2.3)#, hue_kws=dict(marker=["^", "v"]))
fg.map(plt.scatter, 'Experiment_ID', 'percentEff', alpha=.7,)
plt.xlim(560,680)
plt.ylim(12, 17)
plt.axhline(15.5, color='k', linestyle='--')
plt.axhline(14.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg1 = sns.FacetGrid(cell_trends, hue='POR', size= 9, aspect=2.3)
fg1.map(plt.scatter, 'Experiment_ID', 'percentFF', alpha=.7)
plt.xlim(560,680)
plt.ylim(50, 80)
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[27]:
<matplotlib.legend.Legend at 0x2083baa30b8>
In [28]:
flatui = ["#3498db", "#e74c3c", "#2ecc71", "#95a5a6", "#34495e", "#9b59b6"]
sns.set(style='ticks')
sns.set_palette(flatui)
sns.set_context("notebook", font_scale=1.5,)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper

# create our boxplot which is drawn on an Axes object
plt.figure(2, figsize=(20,12))
plt.subplot(211)
bplot = sns.boxplot('Experiment_ID', 'percentEff', hue='POR', data=cell_trends, notch=True)

# We can call all the methods avaiable to Axes objects
#bplot.set_title(title, fontsize=20)
#bplot.set_xlabel('Experiment ID', fontsize=16)
bplot.set_ylabel('cell efficiency [%]', fontsize=16)
bplot.tick_params(axis='y', labelsize=12, which='minor')
bplot.set_ylim(0,20)
bplot.set_xlim(355.5,405.5)
plt.xticks(rotation=30)
plt.legend()

plt.subplot(212)
bplot2 = sns.boxplot('Experiment_ID', 'percentFF', data=cell_trends, hue='POR', notch=True)
bplot2.set_xlabel('Experiment ID', fontsize=16)
bplot2.set_ylabel('cell FF [%]', fontsize=16)
bplot2.tick_params(axis='both', labelsize=12)
bplot2.set_ylim(50,80)
bplot2.set_xlim(355.5,405.5)

#sns.despine(left=True) 
plt.xticks(rotation=30)
#plt.legend()
plt.show()

Voc + Jsc

In [29]:
sns.set(style='ticks')
sns.set_context("poster")
flatui1 = ["#2ecc71", "#34495e", "#95a5a6", "#9b59b6", "#3498db", "#e74c3c",]
sns.set_palette(flatui1)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper
#plt.figure(figsize=(20, 20))

fg = sns.FacetGrid(mod_trends, hue='POR', size=9, aspect=2.5)
fg.map(plt.scatter, 'Experiment_ID', 'modJsc', alpha=.7,)
plt.xlim(560,680)
#plt.xlim([datetime.date(2015, 12, 5), datetime.date(2016, 4, 25)])
plt.ylim(20, 29)
plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()


fg1 = sns.FacetGrid(mod_trends, hue='POR', size= 9, aspect=2.5)
fg1.map(plt.scatter, 'Experiment_ID', 'modVoc', alpha=.7, )
plt.xlim(560,680)
#plt.xlim([datetime.date(2015, 12, 5), datetime.date(2016, 4, 25)])
plt.ylim(.76, .86)
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[29]:
<matplotlib.legend.Legend at 0x208658c2b00>
In [30]:
sns.set(style='ticks')
flatui1 = ["#2ecc71", "#34495e", "#95a5a6", "#9b59b6", "#3498db", "#e74c3c",]
sns.set_palette(flatui1)
sns.set_context("notebook", font_scale=1.5,)

# create our boxplot which is drawn on an Axes object
plt.figure(2, figsize=(20,12))
plt.subplot(211)
bplot = sns.boxplot('Experiment_ID', 'cellJsc', hue='POR', data=cell_trends, notch=True)

# We can call all the methods avaiable to Axes objects
#bplot.set_title(title, fontsize=20)
#bplot.set_xlabel('Experiment ID', fontsize=16)
bplot.set_ylabel('Cell Jsc [$ma/cm^2$]', fontsize=16)
bplot.tick_params(axis='both', labelsize=12)
bplot.set_ylim(22,30)
bplot.set_xlim(355.5,405.5)
plt.xticks(rotation=30)
#bplot.legend()

plt.subplot(212)
bplot2 = sns.boxplot('Experiment_ID', 'cellVoc', data=cell_trends, hue='POR', notch=True)
bplot2.set_xlabel('Experiment ID', fontsize=16)
bplot2.set_ylabel('Cell Voc [V]', fontsize=16)
bplot2.tick_params(axis='both', labelsize=12)
bplot2.set_ylim(0.6,0.9)
bplot2.set_xlim(355.5,405.5)


#sns.despine(left=True) 
plt.xticks(rotation=30)
plt.legend(loc='lower right')
plt.show()

Rs + Rsh

In [31]:
#using extrapolated Rs+Rsh (Roc/Rsc) from LIV curves -- dark R can be found in Rs/Rsh but need to filter for dark

sns.set(style='ticks')
sns.set_context("poster")
flatui2 = ["#95a5a6", "#9b59b6","#2ecc71", "#34495e", "#3498db", "#e74c3c",]
sns.set_palette(flatui2)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper
#plt.figure(figsize=(20, 20))

fg = sns.FacetGrid(mod_trends, hue='POR', size= 9, aspect=2.3)
fg.map(plt.scatter, 'Experiment_ID', 'modRs', alpha=.7,)
plt.xlim(560,680)
plt.ylim(.6, 4)
plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()


fg1 = sns.FacetGrid(mod_trends, hue='POR', size= 9, aspect=2.3)
fg1.map(plt.scatter, 'Experiment_ID', 'modRsh', alpha=.7,)
plt.xlim(560,680)
plt.ylim(1e1, 1e5)
plt.yscale('log')
#plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

plt.savefig('shuntsbrah.png')
In [32]:
sns.set(style='ticks')
flatui2 = ["#95a5a6", "#9b59b6","#2ecc71", "#34495e", "#3498db", "#e74c3c",]
sns.set_palette(flatui2)
sns.set_context("notebook", font_scale=1.5,)
plt.rc('text', usetex=False)

# create our boxplot which is drawn on an Axes object
plt.figure(2, figsize=(20,12))
plt.subplot(211)
bplot = sns.boxplot('Experiment_ID', 'cellRs', hue='POR', data=cell_trends, notch=True)

# We can call all the methods avaiable to Axes objects
#bplot.set_title(title, fontsize=20)
#bplot.set_xlabel('Experiment ID', fontsize=16)
bplot.set_ylabel(r'Cell Rs [$\Omega$]', fontsize=16)
bplot.tick_params(axis='both', labelsize=12)
bplot.set_ylim(0.5,4.5)
bplot.set_xlim(355.5,405.5)
plt.xticks(rotation=30)
#plt.legend()

plt.subplot(212)
bplot2 = sns.boxplot('Experiment_ID', 'cellRsh', data=cell_trends, hue='POR', notch=True)
bplot2.set_xlabel('Experiment ID', fontsize=16)
bplot2.set_ylabel(r'Rsh [$\Omega$]', fontsize=16)
bplot2.tick_params(axis='both', labelsize=12)
bplot2.set_ylim(1,1e5)
bplot2.set_xlim(355.5,405.5)
plt.yscale('log')

#sns.despine(left=True) 
plt.xticks(rotation=30)
plt.legend()
plt.show()
In [33]:
sns.set_context("notebook", font_scale=1.5,)
plt.figure(figsize=(20,12))
#plt.subplot(211)
#bplot = sns.boxplot('Experiment_ID', 'cellRs_norm', hue='POR', data=cell_trends, notch=True)
#bplot.set_ylabel(r'Cell Rs [$\Omega$]', fontsize=16)
#bplot.tick_params(axis='both', labelsize=12)
#bplot.set_ylim(-1.5,15.5)
#bplot.set_xlim(350.5,390.5)
#plt.xticks(rotation=30)

fg = sns.FacetGrid(cell_trends, hue='POR', size= 9, aspect=2.3)
fg.map(plt.scatter, 'Experiment_ID', 'cellRs_norm', alpha=.7,)
plt.xlim(560,680)
plt.ylim(0, 20)
plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg1 = sns.FacetGrid(cell_trends, hue='POR', size= 9, aspect=2.3)
fg1.map(plt.scatter, 'Experiment_ID', 'cellRsh_norm', alpha=.7,)
plt.xlim(560,680)
plt.ylim(1e0, 1e8)
plt.yscale('log')
plt.axhline(15.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[33]:
<matplotlib.legend.Legend at 0x20861771198>
<matplotlib.figure.Figure at 0x208611d4358>
In [34]:
celltrendslatest = cell_trends[(cell_trends['Experiment_ID'] >= 623) & (cell_trends['Experiment_ID'] < 700)]
modtrendslatest = mod_trends[(mod_trends['Experiment_ID'] >= 623) & (mod_trends['Experiment_ID'] < 700)]


sns.set(style='ticks')
flatui2 = ["#95a5a6", "#9b59b6","#2ecc71", "#34495e", "#3498db", "#e74c3c",]
sns.set_palette(flatui2)
sns.set_context("notebook", font_scale=1.5,)

plt.figure(2, figsize=(12,10))
plt.subplot(211)
#v = sns.violinplot(x='Experiment_ID', y='cellRs', hue='POR', data=celltrendslatest, split=True, inner="quartile", bw=.5).set_ylim(-1, 10)
v = sns.violinplot(x='Experiment_ID', y='cellRs', hue='POR', data=celltrendslatest, split=True, inner="quartile", bw=.3).set_ylim(0, 20)
plt.xticks(rotation=30)

plt.subplot(212)
v2 = sns.violinplot(x='Experiment_ID', y='modRs', hue='POR', data=modtrendslatest, split=True, inner="quartile", bw=.3).set_ylim(0.4, 4)

plt.xticks(rotation=30)
Out[34]:
(array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
        34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
        51, 52, 53]), <a list of 54 Text xticklabel objects>)
In [35]:
#cds thickness vs efficiency
sns.set_palette("husl")
sns.set_context("notebook", font_scale=1.5,)

fg = sns.FacetGrid(cds, hue='Target Material', size= 9, aspect=2.4) #col='CdS Tool'
fg.map(plt.scatter, 'CdS Thickness (nm)', 'percentEff', alpha=.6,)
#plt.xlim(550,650)
plt.ylim(0, 17)
plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg1 = sns.FacetGrid(cds, size= 9, aspect=2.4, hue='Current (mA)') #col='CdS Tool'
fg1.map(plt.scatter, 'CdTe Thickness in Angstroms', 'percentEff', alpha=.6,)
plt.xlim(15000,30000)
plt.ylim(0, 17)
plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[35]:
<matplotlib.legend.Legend at 0x208734ffeb8>
In [36]:
colorb=['#66c2a5','#fc8d62','#8da0cb','#e78ac3','#a6d854','#ffd92f']
sns.set_palette("husl")
sns.set_context("notebook", font_scale=1.5,)
fg = sns.FacetGrid(cds, hue='Target Material', size= 9, aspect=2.4) #col='CdS Tool'
fg.map(plt.scatter, 'Date_tm', 'CdS Thickness (nm)', alpha=.6,)
#plt.xlim(550,650)
plt.xlim([datetime.date(2015, 7, 5), datetime.date(2016, 5, 25)])
plt.ylim(20, 100)
#plt.axhline(15.5, color='k', linestyle='-')
plt.title("CdS thickness")
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend(loc="lower right")

fg1 = sns.FacetGrid(cds, hue='Current (mA)', size= 9, aspect=2.4) #col='CdS Tool'
fg1.map(plt.scatter, 'Date_tm', 'CdTe Thickness in Angstroms', alpha=.6,)
#plt.xlim(550,650)
plt.xlim([datetime.date(2015, 7, 5), datetime.date(2016, 5, 25)])
plt.ylim(15000, 30000)
plt.title("CdTe thickness")
#plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend(loc="upper left")
Out[36]:
<matplotlib.legend.Legend at 0x208611d42e8>
In [37]:
list(cds.columns.values)
Out[37]:
['Sample ID',
 'Experiment_ID',
 'Description',
 'Date (IVT measure)',
 'Split1',
 'Split2',
 'Split3',
 'Comments',
 'POR',
 'Experiment ID',
 'Pallet Number',
 'Clean Process Start',
 'Clean Operator',
 'Substrate Type',
 'Clean Process ID',
 'Clean POR',
 'Clean Comment',
 'CdS Process Start',
 'CdS Operator',
 'CdS Tool',
 'Target Material',
 'Target Date',
 'Recipe ID',
 'Deposition Time (sec)/No of pass',
 'CdS POR',
 'CdS Thickness (nm)',
 'CdS Comment',
 'CdS Anneal Process Start',
 'CdS Anneal Operator',
 'CdS Anneal Tool',
 'CdS Anneal Recipe',
 'CdS Anneal POR',
 'CdS Anneal Comment',
 'CdTe 1 Process Start',
 'CdTe Operator',
 'CdTe Tool',
 'CdTe Solution ID',
 'CdTe Starting Potential mV',
 'CdTe QRP mV',
 'CdTe Total Charge C',
 'CdTe Chuck Temp C',
 'CdTe Solution Temp C',
 'Current (mA)',
 'CdTe Flow Rate L per min',
 'CdTe Flow Setting L per min',
 'CdTe Thickness in Angstroms',
 'CdTe POR',
 'CdTe Comment',
 'CdTe 2 Process Start',
 'CdTe 2 Operator',
 'CdTe 2 Tool',
 'CdTe 2 Solution ID',
 'CdTe 2 Starting Potential mV',
 'CdTe 2 QRP mV',
 'CdTe 2 Total Charge C',
 'CdTe 2 Chuck Temp C',
 'CdTe 2 Solution Temp C',
 'CdTe 2 Current (mA)',
 'CdTe 2 Flow Rate L per min',
 'CdTe 2 Flow Setting L per min',
 'CdTe 2 Thickness in Angstroms',
 'CdTe 2 POR',
 'CdTe 2 Comment',
 'CdTe Anneal Process Start',
 'CdTe Anneal Operator',
 'CdTe Anneal Tool',
 'CdTe Anneal Recipe',
 'CdTe Anneal POR',
 'CdTe Anneal Comment',
 'CdCl2 Process Start',
 'CdCl2  Operator',
 'CdCl2 Anneal Tool',
 'CdCl2  Recipe',
 'CdCl2 POR',
 'CdCl2 Comment',
 'Cu Process Start',
 'Cu Operator',
 'Cu Spray Tool',
 'Cu Anneal Tool',
 'Cu Recipe',
 'DAE Solution Date',
 'Cu Stock Date',
 'Cu Diluted Date',
 'Cu POR',
 'Cu Comment',
 'ZnTe Process Start',
 'ZnTe Operator',
 'ZnTe Tool',
 'ZnTe recipe',
 'ZnTe POR',
 'ZnTe Comment',
 'P1 Process Start',
 'P1 Operator',
 'P1 Tool',
 'P1 recipe',
 'P1 POR',
 'P1 Comment',
 'Photo Process Start',
 'Photo Operator',
 'Photo Tool',
 'Photo Anneal Oven',
 'Exposure Tool',
 'Photo Recipe',
 'Photoresist Batch Date',
 'Developer Solution Date',
 'Photo POR',
 'Photo Comment',
 'P2 Process Start',
 'P2 Operator',
 'P2 Tool',
 'P2 recipe',
 'P2 POR',
 'P2 Comment',
 'Sputter Process Start',
 'Sputter Operator',
 'Sputter Tool',
 'Sputter Recipe ID',
 'Sputter POR',
 'Sputter Slot',
 'Sputter Comment',
 'ARC Recipe',
 'ARC POR',
 'ARC Notes',
 'Metal Anneal Process Start',
 'Metal Anneal Operator',
 'Metal Anneal Tool',
 'Metal Anneal Temp',
 'Metal Anneal Recipe',
 'Metal Anneal POR',
 'Metal Anneal Comment',
 'P3 Process Start',
 'P3 Operator',
 'P3 Tool',
 'P3 recipe',
 'P3 POR',
 'P3 Comment',
 'Edge Delete Process Start',
 'Edge Delete Operator',
 'Edge Delete Tool',
 'EdgeDelete recipe',
 'Edge Delete POR',
 'Edge Delete Comment',
 'Additional Process Name',
 'Additional Process Start',
 'Additional Process Operator',
 'Additional Process Tool',
 'Additional Process Notes',
 'Additional Process Comments',
 'Cell_Area_mm2',
 'Cell_Count',
 'Cell_no',
 'Comment',
 'Current_Step',
 'Date_tm',
 'Eff',
 'Efficiency',
 'FF',
 'FillFactor',
 'I0_nA',
 'Iph_mA',
 'Isc_mA',
 'Measurement',
 'NumCells',
 'Pmp_fit_ratio',
 'Pmp_mW',
 'R_squared',
 'Roc_Ohm',
 'Rs_Ohm',
 'Rsc_Ohm',
 'Rsh_Ohm',
 'Sample_ID',
 'Temp_C',
 'User',
 'Vmp_V',
 'Voc_V',
 'n',
 'percentEff',
 'percentFF',
 'Voc',
 'Jsc',
 'Rs',
 'Rsh',
 'Unnamed: 0',
 'Sample',
 'XRF.Date',
 'XRF.Calibration',
 'CdTe_Thickness',
 'CdTe_Density',
 'Cd_Concentration',
 'Cd_Peak',
 'Cd_Background',
 'Te_Concentration',
 'Te_Peak',
 'Te_Background',
 'SnO2_Thickness',
 'SnO2_Density',
 'SnO2_Peak',
 'SnO2_Background',
 'SNR_Cd',
 'SNR_Te',
 'SNR_SnO2',
 'CdTe_Tool']
In [38]:
fg1 = sns.FacetGrid(cds, size= 9, aspect=2.4, hue='CdTe_Tool') #col='CdS Tool'
fg1.map(plt.scatter,'Cd_Concentration','percentEff', alpha=.6,)
plt.xlim(50,54)
plt.ylim(10, 17)
#plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg = sns.FacetGrid(cds, size= 9, aspect=2.4, hue='CdTe_Tool') #col='CdS Tool'
fg.map(plt.scatter,'Date_tm','Cd_Concentration', alpha=.6,)
#plt.xlim(50,54)
plt.xlim([datetime.date(2015, 12, 31), datetime.date(2016, 6, 25)])
plt.ylim(48, 54)
#plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg2 = sns.FacetGrid(cds, size= 9, aspect=2.4, hue='CdTe_Tool') #col='CdS Tool'
fg2.map(plt.scatter,'Date_tm','Te_Concentration', alpha=.6,)
#plt.xlim(50,54)
plt.xlim([datetime.date(2015, 12, 31), datetime.date(2016, 6, 25)])
plt.ylim(46, 50)
#plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()

fg4 = sns.FacetGrid(cds, size= 9, aspect=2.4, hue='CdTe_Tool') #col='CdS Tool'
fg4.map(plt.scatter,'Cd_Concentration','Voc', alpha=.6,)
plt.xlim(50,54)
plt.ylim(0.7, 0.9)
#plt.axhline(15.5, color='k', linestyle='-')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[38]:
<matplotlib.legend.Legend at 0x208625c36a0>
In [64]:
sns.color_palette("Paired")
sns.set_context("poster")


fg = sns.FacetGrid(cds, size= 6, aspect=1.5, col='CdTe_Tool', margin_titles=True, xlim=([datetime.date(2015, 7, 31), datetime.date(2016, 6, 25)]), ylim=(43, 58),hue='Cd_Concentration', palette = "coolwarm", legend_out=True) #col='CdS Tool'
plt.xticks(rotation=30)
fg.map(plt.scatter,'Date_tm', 'Cd_Concentration', alpha=.6,)
#plt.title("Cd Conc")
fg.set_xticklabels(rotation=30)
fg2 = sns.FacetGrid(cds, size= 6, aspect=1.5, margin_titles=True, xlim=([datetime.date(2015, 7, 31), datetime.date(2016, 6, 25)]), ylim=(43, 58),col='CdTe_Tool', hue='Te_Concentration', palette = "coolwarm", legend_out=True) #col='CdS Tool'
fg2.map(plt.scatter,'Date_tm', 'Te_Concentration', alpha=.6,)
#plt.title("Te Conc")
fg2.set_xticklabels(rotation=30)
Out[64]:
<seaborn.axisgrid.FacetGrid at 0x2085edfbb38>
In [40]:
cds.plot(kind='scatter', x='percentEff', y='Cd_Concentration');
plt.xlim(14,16.5)
plt.ylim(50,52)
Out[40]:
(50, 52)
In [41]:
sns.set_palette("husl")
sns.set_context("notebook", font_scale=1.5,)
fg = sns.FacetGrid(cds, hue='CdS Tool', size= 9, aspect=2.4)#, col='CdS Tool')
fg.map(plt.scatter, 'Date_tm', 'CdS Thickness (nm)', alpha=.6,)
#plt.xlim(550,650)
plt.xlim([datetime.date(2015, 7, 1), datetime.date(2016, 7, 1)])
plt.ylim(20, 100)
#plt.axhline(15.5, color='k', linestyle='-')
plt.title("CdS thickness by tool")
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend(loc="lower right")

fg1 = sns.FacetGrid(cds, hue='CdS Tool', size= 9, aspect=2.4)#, col='CdS Tool')
fg1.map(plt.scatter, 'CdS Thickness (nm)', 'percentEff',alpha=.6,)
plt.xlim(0,90)
#plt.xlim([datetime.date(2015, 7, 1), datetime.date(2016, 7, 1)])
plt.ylim(10, 20)
plt.axhline(15.5, color='k', linestyle='-')
plt.title("CdS thickness v eff")
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend(loc="best")
Out[41]:
<matplotlib.legend.Legend at 0x20878eea780>

stats -- cell & module

In [42]:
trends.describe()

#trends.sort_values(by='Date_tm')
#trends.iloc[:,[1,2,5,22,23,37, 38, 39]]
Out[42]:
Experiment_ID CdS Thickness (nm) CdTe Thickness in Angstroms Cell_Area_mm2 Cell_Count Cell_no Eff Efficiency FF FillFactor I0_nA Iph_mA Isc_mA NumCells Pmp_fit_ratio Pmp_mW R_squared Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Temp_C Vmp_V Voc_V n percentEff percentFF Voc Jsc Rs Rsh
count 208689.000000 206467.000000 177827.000000 213055.000000 213055.000000 213055.000000 0 107673.000000 0 107254.000000 0 0 107674.000000 0 0 107674.000000 0 1.075630e+05 213045.000000 1.075640e+05 2.129980e+05 213055.000000 107674.000000 107243.000000 0 107673.000000 107254.000000 107243.000000 107673.000000 107562.000000 107563.000000
mean 574.375722 69.361703 20116.198929 288.430495 2.773096 11.613241 NaN 0.121412 NaN 0.770079 NaN NaN 138.070958 NaN NaN 186.968790 NaN 9.649615e+03 4269.103276 1.432593e+04 6.010033e+05 27.396815 1.586325 2.160156 NaN 12.141177 77.007896 0.777825 24.428920 694.213205 1702.930241
std 59.412598 10.567004 4729.988298 279.760775 5.834988 6.735397 NaN 0.038961 NaN 46.369988 NaN NaN 18.020410 NaN NaN 398.623351 NaN 2.241010e+06 361729.720488 2.506809e+06 5.405023e+07 1.599572 3.341442 4.636215 NaN 3.896126 4636.998764 0.931891 3.189341 104221.847812 133446.065470
min 467.000000 11.000000 1452.000000 0.000000 0.000000 1.000000 NaN 0.000000 NaN 0.000000 NaN NaN 0.000000 NaN NaN 0.000000 NaN 2.092800e-02 0.021370 2.370800e-02 1.858800e-02 0.000000 0.000000 -17.031892 NaN 0.000000 0.000000 -17.031892 0.000000 0.020928 0.023708
25% 523.000000 61.000000 15954.000000 5.650000 1.000000 5.000000 NaN 0.109729 NaN 0.585782 NaN NaN 135.607570 NaN NaN 64.347843 NaN 9.230520e-01 0.811687 4.189609e+01 8.519915e+01 26.346662 0.572149 0.783739 NaN 10.972900 58.578225 0.778275 23.977730 0.919684 39.803869
50% 575.000000 69.000000 21499.000000 565.000000 1.000000 11.000000 NaN 0.133861 NaN 0.666162 NaN NaN 140.856078 NaN NaN 77.576499 NaN 1.028762e+00 1.609269 8.671508e+01 4.343703e+02 27.242685 0.625336 0.810673 NaN 13.386100 66.616200 0.806583 24.918484 1.013788 77.851255
75% 625.000000 73.000000 22451.000000 565.000000 1.000000 17.000000 NaN 0.144471 NaN 0.698169 NaN NaN 145.695777 NaN NaN 83.545643 NaN 1.402134e+00 3.472676 2.363843e+02 8.703640e+03 28.408272 0.652007 0.823895 NaN 14.447100 69.816875 0.819910 25.784493 1.250414 172.078157
max 674.000000 170.000000 224018.000000 575.000000 23.000000 23.000000 NaN 1.169608 NaN 15182.410604 NaN NaN 304.294011 NaN NaN 2045.689848 NaN 7.277880e+08 71926771.933288 7.844196e+08 2.235724e+10 41.478232 18.102726 302.814585 NaN 116.960800 1518241.060400 302.814585 53.857347 33081270.805875 35655437.861323
In [43]:
cds.describe()
Out[43]:
Experiment_ID CdS Thickness (nm) CdTe Thickness in Angstroms Cell_Area_mm2 Cell_Count Cell_no Eff Efficiency FF FillFactor I0_nA Iph_mA Isc_mA NumCells Pmp_fit_ratio Pmp_mW R_squared Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Temp_C Vmp_V Voc_V n percentEff percentFF Voc Jsc Rs Rsh Unnamed: 0 CdTe_Thickness CdTe_Density Cd_Concentration Cd_Peak Cd_Background Te_Concentration Te_Peak Te_Background SnO2_Thickness SnO2_Density SnO2_Peak SnO2_Background SNR_Cd SNR_Te SNR_SnO2
count 8726.000000 8632.000000 7415.000000 8892.000000 8892.000000 8892.000000 0 8892.000000 0 8885.000000 0 0 8892.000000 0 0 8892.000000 0 8.892000e+03 8892.000000 8.892000e+03 8.890000e+03 8892.000000 8892.000000 8885.000000 0 8892.000000 8885.000000 8885.000000 8891.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8890.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000 8892.000000
mean 573.954848 69.329217 20100.625354 565.016262 22.000900 1.998875 NaN 0.116928 NaN 2.321044 NaN NaN 137.842228 NaN NaN 1453.671153 NaN 1.134716e+05 40965.567908 1.597785e+05 2.967558e+06 28.199222 12.382865 16.930440 NaN 11.692838 232.104409 0.769532 24.393782 5157.802157 7262.651000 4789.191408 19894.175596 7.276024 51.100382 4067.069276 174.599978 48.910619 4002.174989 264.574112 4351.730859 7.467984 1147.925439 101.545659 0.959709 0.936751 0.918941
std 59.908271 10.362223 4727.658221 7.352214 0.029983 0.033518 NaN 0.026571 NaN 161.062580 NaN NaN 15.621346 NaN NaN 330.485938 NaN 7.793541e+06 1340162.251675 8.714536e+06 2.382059e+08 2.031126 1.952671 1.825943 NaN 2.657143 16106.258021 0.082971 2.762849 354251.873780 396115.269682 3168.007310 3452.190420 0.032650 1.264415 609.071508 120.540217 1.030037 571.885129 119.399764 749.146194 0.549916 42.330370 30.200288 0.030324 0.034454 0.026961
min 467.000000 11.000000 1452.000000 0.000000 22.000000 1.000000 NaN 0.000000 NaN 0.087460 NaN NaN 0.000000 NaN NaN 0.000000 NaN 9.590290e-01 0.954137 1.665353e+00 6.095970e-01 22.406696 0.000000 0.032261 NaN 0.000000 8.746000 0.001466 0.000000 0.043592 0.075698 2250.000000 52.200000 6.887000 33.700000 12.000000 27.000000 25.100000 0.000000 108.000000 0.000000 7.300000 0.000000 54.000000 0.083922 0.000000 0.000000
25% 523.000000 61.000000 15888.000000 565.000000 22.000000 2.000000 NaN 0.109320 NaN 0.579439 NaN NaN 135.992889 NaN NaN 1358.700383 NaN 2.186055e+01 15.536958 1.109776e+03 1.868506e+03 26.606468 11.799924 16.888009 NaN 10.932025 57.943900 0.767637 24.049901 0.993661 50.444356 3376.750000 15685.775000 7.266000 50.700000 3383.750000 84.000000 48.700000 3356.000000 199.000000 3467.675000 7.300000 1126.000000 83.000000 0.944705 0.926283 0.910333
50% 574.000000 69.000000 21497.000000 565.000000 22.000000 2.000000 NaN 0.124074 NaN 0.630244 NaN NaN 140.473287 NaN NaN 1542.244020 NaN 2.448674e+01 17.894990 2.000049e+03 3.293265e+03 28.014429 12.931437 17.510069 NaN 12.407350 63.024400 0.795912 24.853911 1.113034 90.911312 4471.000000 21423.250000 7.274000 51.000000 4304.000000 126.000000 49.000000 4225.000000 242.000000 4851.200000 7.300000 1153.000000 92.000000 0.968597 0.937376 0.925212
75% 626.000000 73.000000 22454.000000 565.000000 22.000000 2.000000 NaN 0.133886 NaN 0.666657 NaN NaN 144.830673 NaN NaN 1664.745813 NaN 2.874862e+01 20.799528 4.337344e+03 6.891332e+03 29.963842 13.612241 17.815288 NaN 13.388625 66.665700 0.809776 25.638386 1.306756 197.152015 5753.000000 22382.125000 7.281000 51.300000 4485.000000 253.000000 49.300000 4404.000000 317.000000 5001.300000 7.300000 1172.000000 116.000000 0.977615 0.954388 0.931965
max 674.000000 112.000000 224018.000000 575.000000 23.000000 2.000000 NaN 0.164577 NaN 15182.410604 NaN NaN 171.986190 NaN NaN 2045.689848 NaN 7.277880e+08 71926771.933288 7.844196e+08 2.235724e+10 41.478232 18.102726 20.809271 NaN 16.457700 1518241.060400 0.945876 30.440034 33081270.805875 35655437.861323 37691.000000 32589.600000 8.650000 100.000000 9562.000000 2228.000000 66.300000 6176.000000 3426.000000 5307.300000 9.268000 1282.000000 706.000000 0.989588 0.979863 0.958365
In [44]:
#import seaborn as sns
sns.set(style="ticks", context="talk")

plt.figure(2, figsize=(12,10))

# Make a custom sequential palette using the cubehelix system
pal = sns.cubehelix_palette(4, 1.5, .75, light=.6, dark=.2)

# Plot tip as a function of toal bill across days
b = sns.lmplot(x='Experiment_ID', y='percentEff', col='POR', data=cell_trends,
               palette=pal, size=7)

# Use more informative axis labels than are provided by default
b.set_axis_labels("Experiment ID", "Efficiency [%]")
plt.xlim(500,680)
plt.ylim(4, 18)
Out[44]:
(4, 18)
<matplotlib.figure.Figure at 0x20861196160>
In [45]:
#dff.groupby('B').filter(lambda x: len(x['C']) > 2)
#groupedcells = cell_trends.groupby(['Experiment_ID', 'POR', 'Measurement']).filter(lambda x: )
#groupedcells = groupedcells.drop('Eff')

#del celldf
#del groupedcell 

celldf = cell_trends.drop(['Eff', 'NumCells', 'FF', 'I0_nA', 'n', 'Pmp_fit_ratio'], axis=1)
celldf = celldf[~celldf['Measurement'].str.contains('.*Dark.*', na = False)]
celldf.head()

moddf = mod_trends.drop(['Eff', 'NumCells', 'FF', 'I0_nA', 'n', 'Pmp_fit_ratio'], axis=1)
moddf = moddf[~moddf['Measurement'].str.contains('.*Dark.*', na = False)]
moddf.head()

#setting up grouped median and mean dfs
groupmoddf = moddf.groupby('Experiment_ID', as_index=False)
modmedian = groupmoddf.median()
modmean = groupmoddf.mean()


groupcelldf = celldf.groupby('Experiment_ID', as_index=False)
cellmedian = groupcelldf.median()
cellmean = groupcelldf.mean()

list(cellmedian.columns.values)
Out[45]:
['Experiment_ID',
 'Cell_Area_mm2',
 'Cell_Count',
 'Cell_no',
 'Efficiency',
 'FillFactor',
 'Isc_mA',
 'Pmp_mW',
 'Roc_Ohm',
 'Rs_Ohm',
 'Rsc_Ohm',
 'Rsh_Ohm',
 'Temp_C',
 'Vmp_V',
 'Voc_V',
 'percentEff',
 'percentFF',
 'cellVoc',
 'cellJsc',
 'cellRs',
 'cellRs_norm',
 'cellRsh',
 'cellRsh_norm',
 'shunt_count']
In [46]:
cellmedian.tail(50)
Out[46]:
Experiment_ID Cell_Area_mm2 Cell_Count Cell_no Efficiency FillFactor Isc_mA Pmp_mW Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Temp_C Vmp_V Voc_V percentEff percentFF cellVoc cellJsc cellRs cellRs_norm cellRsh cellRsh_norm shunt_count
361 627.0 565 1 12.5 0.132584 0.639284 149.193882 74.910362 1.010021 0.708271 84.557765 130.424583 29.494025 0.592627 0.784611 13.25845 63.92840 0.784611 26.405997 0.708271 4.001728 84.557765 477.751372 1
362 628.0 565 1 12.5 0.141357 0.690786 143.584439 79.866993 0.952739 0.784082 88.677359 129.246214 28.857863 0.624304 0.811456 14.13575 69.07865 0.811456 25.413175 0.784082 4.430063 88.677359 501.027078 1
363 629.0 565 1 12.5 0.146932 0.711961 142.090173 83.016682 0.899244 0.765256 98.314758 139.500867 28.674636 0.647490 0.822606 14.69320 71.19615 0.822606 25.148703 0.765256 4.323694 98.314758 555.478383 1
364 630.0 565 1 12.5 0.144389 0.690230 145.803833 81.579531 0.951205 0.599957 100.623593 150.475259 28.225439 0.627999 0.808606 14.43885 69.02305 0.808606 25.805988 0.599957 3.389754 100.623593 568.523303 1
365 631.0 565 1 12.5 0.102114 0.558959 140.601231 57.694685 1.383992 0.768769 44.365947 68.404459 27.914561 0.508055 0.728556 10.21145 55.89595 0.728556 24.885174 0.768769 4.343545 44.365947 250.667601 1
366 632.0 565 1 12.5 0.140490 0.692375 142.031866 79.377235 0.965947 0.621609 91.567498 117.500822 28.538697 0.619457 0.802391 14.04905 69.23750 0.802391 25.138383 0.621609 3.512094 91.567498 517.356364 1
367 633.0 565 1 12.5 0.124440 0.642325 139.386199 70.308159 1.105875 0.754660 83.015210 118.602105 27.740596 0.584442 0.782776 12.44395 64.23250 0.782776 24.670124 0.754660 4.263829 83.015210 469.035939 1
368 634.0 565 1 12.5 0.136396 0.676889 141.430625 77.063790 1.008544 0.608716 82.197763 127.693438 28.648980 0.616552 0.802884 13.63960 67.68890 0.802884 25.031969 0.608716 3.439245 82.197763 464.417361 1
369 635.0 565 1 12.5 0.142325 0.698703 141.143932 80.413620 0.961026 0.580410 89.414747 136.632408 28.349764 0.629105 0.810807 14.23250 69.87030 0.810807 24.981227 0.580410 3.279314 89.414747 505.193321 1
370 636.0 565 1 12.5 0.137274 0.686476 140.239887 77.559891 0.988635 0.603621 82.098744 133.747260 28.576597 0.622341 0.800911 13.72745 68.64755 0.800911 24.821219 0.603621 3.410459 82.098744 463.857904 1
371 637.0 565 1 12.5 0.142547 0.671699 148.476017 80.539163 0.992432 0.669817 85.894548 165.489017 28.696174 0.612611 0.803257 14.25470 67.16990 0.803257 26.278941 0.669817 3.784463 85.894548 485.304196 1
372 638.0 565 1 12.5 0.143819 0.689034 144.878057 81.257504 0.957874 0.602259 114.927023 184.452990 29.257390 0.633657 0.813766 14.38185 68.90335 0.813766 25.642134 0.602259 3.402761 114.927023 649.337677 1
373 639.0 565 1 12.5 0.150138 0.696111 148.045981 84.827911 0.931627 0.624627 100.016484 159.253322 28.463598 0.639417 0.819908 15.01380 69.61110 0.819908 26.202828 0.624627 3.529143 100.016484 565.093135 1
374 640.0 565 1 12.5 0.141750 0.679348 146.057670 80.088923 0.981818 0.617672 99.358724 151.138895 30.314540 0.618615 0.806136 14.17500 67.93485 0.806136 25.850915 0.617672 3.489850 99.358724 561.376791 1
375 641.0 565 1 12.5 0.147636 0.699380 143.852419 83.414215 0.944848 0.634729 108.411648 159.423194 28.660160 0.645366 0.824806 14.76355 69.93805 0.824806 25.460605 0.634729 3.586219 108.411648 612.525811 1
376 642.0 565 1 12.5 0.137485 0.679116 141.612089 77.679045 1.017533 0.771366 95.400611 161.181389 28.035390 0.620299 0.803124 13.74850 67.91160 0.803124 25.064087 0.771366 4.358215 95.400611 539.013452 1
377 643.0 565 1 12.5 0.147111 0.692260 147.516430 83.117625 0.953971 0.633407 88.833362 141.685823 28.129476 0.627787 0.812333 14.71110 69.22605 0.812333 26.109103 0.633407 3.578750 88.833362 501.908498 1
378 644.0 565 1 12.5 0.136425 0.686475 140.027116 77.080302 1.001514 0.683584 101.578835 134.691465 28.778786 0.614362 0.796942 13.64250 68.64745 0.796942 24.783560 0.683584 3.862250 101.578835 573.920421 1
379 645.0 565 1 12.5 0.137999 0.697676 136.989936 77.969603 0.983396 0.584129 70.083104 91.844222 29.206105 0.625613 0.805082 13.79995 69.76755 0.805082 24.246006 0.584129 3.300326 70.083104 395.969538 1
380 646.0 565 1 12.5 0.090370 0.568409 128.461984 51.059167 1.404192 0.975423 45.465632 73.754728 28.569064 0.504923 0.717822 9.03700 56.84090 0.717822 22.736634 0.975423 5.511140 45.465632 256.880821 1
381 647.0 565 1 12.5 0.136010 0.693024 138.042163 76.845800 0.994728 0.593888 90.449371 120.029011 28.335755 0.616219 0.800467 13.60105 69.30240 0.800467 24.432241 0.593888 3.355467 90.449371 511.038946 1
382 648.0 565 1 12.5 0.143885 0.725269 136.828521 81.294843 0.911717 0.528296 85.683952 121.286278 29.519425 0.650888 0.821260 14.38850 72.52690 0.821260 24.217437 0.528296 2.984872 85.683952 484.114326 1
383 648.5 565 1 12.5 0.087969 0.518056 138.062083 49.702251 1.349876 0.757208 42.611576 65.998612 28.520923 0.468452 0.684062 8.79685 51.80560 0.684062 24.435767 0.757208 4.278222 42.611576 240.755404 1
384 649.0 565 1 12.5 0.143105 0.682624 145.132140 80.854685 0.995383 0.663665 93.231183 153.838864 28.484786 0.614715 0.808720 14.31055 68.26235 0.808720 25.687105 0.663665 3.749707 93.231183 526.756181 1
385 650.0 565 1 12.5 0.140171 0.680219 142.773931 79.196411 1.017154 0.624669 87.925916 129.891908 28.505621 0.609938 0.800253 14.01710 68.02195 0.800253 25.269722 0.624669 3.529380 87.925916 496.781425 1
386 651.0 565 1 12.5 0.123053 0.626853 142.549464 69.525486 1.139439 0.845143 69.428857 122.551592 27.426984 0.571470 0.775817 12.30535 62.68530 0.775817 25.229994 0.845143 4.775058 69.428857 392.273045 1
387 652.0 565 1 12.5 0.144307 0.684414 145.626461 81.533411 0.981824 0.713820 94.675865 154.815231 28.437466 0.627111 0.814228 14.43070 68.44145 0.814228 25.774595 0.713820 4.033080 94.675865 534.918634 1
388 653.0 565 1 12.5 0.142132 0.674899 146.207752 80.304654 0.998545 0.672297 68.574269 99.281900 28.224026 0.615374 0.808985 14.21320 67.48995 0.808985 25.877478 0.672297 3.798481 68.574269 387.444623 1
389 653.5 565 1 12.5 0.120845 0.630062 143.714049 68.277713 1.143823 0.946480 76.303511 131.907608 28.399560 0.552401 0.758409 12.08455 63.00620 0.758409 25.436115 0.946480 5.347612 76.303511 431.114837 1
390 654.0 565 1 12.5 0.144421 0.677351 146.072870 81.598158 0.993437 0.674803 75.733505 116.067399 29.458980 0.614875 0.809513 14.44215 67.73510 0.809513 25.853605 0.674803 3.812637 75.733505 427.894303 1
391 655.0 565 1 12.5 0.110152 0.605337 136.850364 62.235745 1.246568 1.230839 59.983202 89.440748 28.193531 0.549676 0.757748 11.01520 60.53370 0.757748 24.221303 1.230839 6.954240 59.983202 338.905091 1
392 656.0 565 1 12.5 0.138739 0.678978 142.599831 78.387707 0.986940 0.741551 76.484234 129.753612 27.669446 0.621168 0.806709 13.87395 67.89780 0.806709 25.238908 0.741551 4.189760 76.484234 432.135919 1
393 657.0 565 1 12.5 0.105771 0.575846 138.398945 59.760266 1.199824 0.586460 49.333481 77.491176 28.554468 0.550185 0.754962 10.57705 57.58465 0.754962 24.495388 0.586460 3.313499 49.333481 278.734168 1
394 658.0 565 1 12.5 0.141870 0.690893 142.808346 80.156589 0.953776 0.617950 84.882246 150.264488 28.596488 0.631814 0.807794 14.18700 69.08930 0.807794 25.275813 0.617950 3.491418 84.882246 479.584690 1
395 659.0 565 1 12.5 0.135508 0.652286 146.244275 76.561847 1.032648 0.643625 81.041004 114.387225 28.789378 0.610183 0.802101 13.55080 65.22860 0.802101 25.883942 0.643625 3.636481 81.041004 457.881673 1
396 660.0 565 1 12.5 0.137952 0.665039 148.513832 77.942494 1.001893 0.610599 100.557827 151.481536 28.406389 0.599865 0.790351 13.79515 66.50390 0.790351 26.285634 0.610599 3.449887 100.557827 568.151720 1
397 661.0 565 1 12.5 0.129592 0.628459 153.994849 73.219881 1.015724 0.745998 64.641213 114.464266 27.577439 0.542725 0.737969 12.95925 62.84585 0.737969 27.255726 0.745998 4.214889 64.641213 365.222856 1
398 662.0 565 1 12.5 0.144142 0.674697 151.965353 81.440365 0.939859 0.596730 86.952493 143.202753 27.480477 0.598472 0.789100 14.41420 67.46975 0.789100 26.896523 0.596730 3.371525 86.952493 491.281585 1
399 663.0 565 1 12.5 0.147334 0.689291 150.405361 83.243704 0.915512 0.554335 92.084619 139.436224 28.270061 0.619595 0.800342 14.73340 68.92915 0.800342 26.620418 0.554335 3.131993 92.084619 520.278095 1
400 664.0 565 1 12.5 0.149835 0.702952 148.509478 84.656742 0.894684 0.522725 91.005786 128.320918 28.493026 0.639544 0.815551 14.98350 70.29520 0.815551 26.284863 0.522725 2.953396 91.005786 514.182694 1
401 665.0 565 1 12.5 0.152390 0.709060 149.583823 86.100161 0.875645 0.502842 94.850712 155.590936 28.053878 0.643904 0.816438 15.23895 70.90605 0.816438 26.475013 0.502842 2.841057 94.850712 535.906520 1
402 666.0 565 1 12.5 0.139610 0.693807 141.770377 78.879906 0.947799 0.538082 83.301406 142.682949 27.639053 0.618621 0.797884 13.96105 69.38075 0.797884 25.092102 0.538082 3.040163 83.301406 470.652944 1
403 667.0 565 1 12.5 0.137221 0.680728 138.280984 77.529812 0.987658 0.568812 68.267776 113.754778 27.266726 0.607863 0.796278 13.72210 68.07280 0.796278 24.474510 0.568812 3.213785 68.267776 385.712934 1
404 668.0 565 1 12.5 0.137683 0.692756 139.693502 77.790898 0.959588 0.585396 85.379415 133.153914 27.162427 0.627911 0.800642 13.76830 69.27555 0.800642 24.724514 0.585396 3.307490 85.379415 482.393698 1
405 669.0 565 1 12.5 0.138561 0.690056 139.799526 78.286599 0.954433 0.575036 94.294202 150.326425 27.016157 0.630775 0.805542 13.85605 69.00565 0.805542 24.743279 0.575036 3.248951 94.294202 532.762238 1
406 670.0 565 1 12.5 0.145157 0.718981 141.864841 82.013880 0.880149 0.494681 97.922015 144.996322 26.927984 0.640707 0.806903 14.51575 71.89815 0.806903 25.108821 0.494681 2.794950 97.922015 553.259385 1
407 671.0 565 1 12.5 0.146064 0.702975 145.689955 82.525721 0.895292 0.534550 101.039327 142.962980 26.353267 0.634878 0.804865 14.60635 70.29755 0.804865 25.785833 0.534550 3.020208 101.039327 570.872200 1
408 672.0 565 1 12.5 0.134747 0.681879 143.597210 76.131876 0.998141 0.556910 104.832915 155.489352 26.915370 0.596496 0.780253 13.47470 68.18795 0.780253 25.415435 0.556910 3.146542 104.832915 592.305970 1
409 673.0 565 1 12.5 0.135535 0.670691 141.734667 76.577265 0.987384 0.575906 71.973229 110.423284 26.450097 0.612645 0.797773 13.55350 67.06910 0.797773 25.085782 0.575906 3.253869 71.973229 406.648741 1
410 674.0 565 1 12.5 0.144458 0.719219 140.926579 81.619089 0.869694 0.523352 73.921125 108.210358 26.444790 0.646990 0.820998 14.44585 71.92190 0.820998 24.942757 0.523352 2.956942 73.921125 417.654356 1
In [47]:
#ax = df1.plot() method to plot 2 dfs on same plot
#df2.plot(ax=ax)

plt.figure(2, figsize=(15,10))
ax = cellmedian.plot( y=[15], label = 'median Eff')
cellmean.plot(ax=ax, y=[15], label = 'mean Eff' )
lines, labels = ax.get_legend_handles_labels()
ax.legend(lines[:2], labels[:2], loc='best')
plt.ylim(7,17)
plt.xlim(250, 420)
Out[47]:
(250, 420)
<matplotlib.figure.Figure at 0x2094211c898>
In [48]:
plt.figure(2, figsize=(14,8))

ax = modmedian.plot(kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'mod med', color = 'DarkBlue', title = 'mod efficiencies')
modmean.plot(ax=ax, x=['Experiment_ID'], y=['percentEff'], label = 'mod mean', kind ='scatter', color = 'DarkGreen')
cellmedian.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'cell med', color = 'LightBlue', title = 'efficiencies')
cellmean.plot(ax=ax, x=['Experiment_ID'], y=['percentEff'], label = 'cell mean', kind ='scatter', color = 'LightGreen')
lines, labels = ax.get_legend_handles_labels()
ax.legend(lines[:4], labels[:4], loc='upper right')
plt.ylim(8,18)
plt.xlim(560, 680)
Out[48]:
(560, 680)
<matplotlib.figure.Figure at 0x2085df44160>
In [49]:
#median = median.reset_index()
#mean = mean.reset_index()
plt.figure(figsize=(12,10))

ax = modmedian.plot(kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'mod med', color = 'Red')
cellmedian.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'cell med', color = 'LightBlue')
lines, labels = ax.get_legend_handles_labels()
plt.ylim(8,18)
plt.xlim(500, 680)
plt.title('efficiencies')
Out[49]:
<matplotlib.text.Text at 0x2087316f588>
<matplotlib.figure.Figure at 0x20867172be0>
In [50]:
plt.figure(figsize=(12,10))

ax = modmean.plot(kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'mod mean', color = 'Red')
cellmean.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['percentEff'], label = 'cell mean', color = 'LightBlue')
lines, labels = ax.get_legend_handles_labels()
plt.ylim(8,18)
plt.xlim(500, 680)
plt.title('efficiencies')
Out[50]:
<matplotlib.text.Text at 0x2085d8cea90>
<matplotlib.figure.Figure at 0x208731e6518>
In [51]:
allmed1 = pd.merge(modmedian, cellmedian, on='Experiment_ID')
allmed1['del_percentEff'] = allmed1['percentEff_x'] - allmed1['percentEff_y']
allmed1['del_percentFF'] = allmed1['percentFF_x'] - allmed1['percentFF_y']

plt.figure(2, figsize=(25,20))

ax = allmed1.plot(kind = 'scatter', x=['Experiment_ID'], y=['del_percentFF'], label = 'del FF mod-cell', color = 'DarkRed')
allmed1.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['del_percentEff'], label = 'del eff mod-cell', color = 'LightBlue')
#allmed1.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['del_voc'], label = 'del eff mod-cell med', color = 'LightBlue')
lines, labels = ax.get_legend_handles_labels()
plt.axhline(0, color='k', linestyle='--')
plt.axhline(-5, color='b', linestyle='--')
plt.axhline(-10, color='r', linestyle='--')
plt.ylim(-12,8)
plt.xlim(500, 680)
plt.title('median del')
Out[51]:
<matplotlib.text.Text at 0x20941be7550>
<matplotlib.figure.Figure at 0x20873410940>
In [52]:
#del allmed
#allmed = pd.merge(modmedian, cellmedian, on='Experiment_ID')
allmed = pd.concat([modmedian, cellmedian])

allmean1 = pd.merge(modmean, cellmean, on='Experiment_ID')
allmean1['del_percentEff'] = allmean1['percentEff_x'] - allmean1['percentEff_y']
allmean1['del_percentFF'] = allmean1['percentFF_x'] - allmean1['percentFF_y']

plt.figure(figsize=(20,20))
ax = allmean1.plot(kind = 'scatter', x=['Experiment_ID'], y=['del_percentFF'], label = 'del FF mod-cell', color = 'DarkRed')
allmean1.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['del_percentEff'], label = 'del eff mod-cell mean', color = 'LightBlue')
#allmed1.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['del_voc'], label = 'del eff mod-cell med', color = 'LightBlue')
lines, labels = ax.get_legend_handles_labels()
plt.axhline(0, color='k', linestyle='--')
plt.axhline(-5, color='b', linestyle='--')
plt.axhline(-10, color='r', linestyle='--')
plt.ylim(-4,4)
plt.xlim(500, 680)
plt.title('mean del')
Out[52]:
<matplotlib.text.Text at 0x208616795c0>
<matplotlib.figure.Figure at 0x209619ef3c8>
In [53]:
allmed1['del_voc'] = allmed1['modVoc'] - allmed1['cellVoc']
allmed1['del_jsc'] = allmed1['modJsc'] - allmed1['cellJsc']

plt.figure(figsize=(18,10))


ax = allmed1.plot(kind = 'scatter', x=['Experiment_ID'], y=['del_jsc'], label = 'jsc', color = 'Red')
allmed1.plot(ax=ax, kind='scatter', x=['Experiment_ID'], y=['del_voc'], label = 'voc', color = 'Green')
lines, labels = ax.get_legend_handles_labels()
plt.axhline(0, color='k', linestyle='--')
plt.axhline(-1, color='b', linestyle='--')
plt.axhline(-2, color='r', linestyle='--')
plt.ylim(-1,0.5)
plt.xlim(600, 680)
plt.title('dels')
Out[53]:
<matplotlib.text.Text at 0x2085c4e1978>
<matplotlib.figure.Figure at 0x2087353b1d0>
In [54]:
sns.set(style='ticks')
sns.set_context("poster")
flatui1 = ["#2ecc71", "#34495e", "#95a5a6", "#9b59b6", "#3498db", "#e74c3c",]
sns.set_palette(flatui1)
#fig, ax = plt.subplots(figsize=(15, 15))
# the size of A4 paper
#plt.figure(figsize=(20, 20))


fg = sns.FacetGrid(allmed, hue='Cell_Count', size= 9, aspect=2.3,despine=False)#, hue_kws=dict(marker=["^", "v"]))
fg.map(plt.scatter, 'Experiment_ID', 'percentEff', alpha=.7,)
plt.xlim(250,680)
plt.ylim(6, 18)
#plt.axhline(15.5, color='k', linestyle='--')
#plt.axhline(14.5, color='k', linestyle='--')
plt.grid(b=True, which='both', color='0.65',linestyle='-')
plt.legend()
Out[54]:
<matplotlib.legend.Legend at 0x2083bb2f9b0>
In [55]:
#del groupedcells

celltrendstrimmed = cell_trends[(cell_trends['Experiment_ID'] >= 400) & (cell_trends['Experiment_ID'] < 700)]
groupedcells = celltrendstrimmed.groupby(['Experiment_ID', 'POR'],as_index=False)

groupedmean = groupedcells.aggregate(np.mean)
#groupedmean = groupedmean.reset_index()

#groupedmean
#groupedmean.info()
#print(groupedmean.columns)

sns.set_context("notebook")
plt.figure(figsize=(10, 10))
p = sns.lmplot(x="Experiment_ID", y="percentEff",  data=groupedmean, col ="POR", size=8)
plt.ylim(6,18)
Out[55]:
(6, 18)
<matplotlib.figure.Figure at 0x208610af160>
In [56]:
b = pd.DataFrame(mod_trends.groupby(['Experiment_ID'], as_index=False)['shunt_count'].sum())

b.sort_values(by='Experiment_ID')
b.head()
plt.figure(figsize=(15, 8))

sns.barplot(x='Experiment_ID', y='shunt_count', data=b)
plt.xlim(200.5, 405.5)
plt.ylim(0,30)
plt.xticks(rotation=30)
Out[56]:
(array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
         13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,
         26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,
         39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,
         52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,
         65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,
         78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,
         91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,
        104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
        117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
        130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
        143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
        156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
        169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
        182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
        195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
        208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
        221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
        234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
        247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
        260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
        273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
        286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
        299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
        312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
        325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
        338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
        351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
        364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
        377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
        390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
        403, 404, 405, 406, 407, 408, 409, 410]),
 <a list of 411 Text xticklabel objects>)
In [57]:
plt.figure(figsize=(15, 8))
b.plot(x='Experiment_ID', y='shunt_count', kind='bar')
plt.xlim(350.5, 405.5)
plt.ylim(0,40)
Out[57]:
(0, 40)
<matplotlib.figure.Figure at 0x20863f2d6d8>
In [58]:
b1 = pd.DataFrame(cell_trends.groupby(['Experiment_ID'], as_index=False)['shunt_count'].sum())

b1.sort_values(by='Experiment_ID')
b1.head()
plt.figure(figsize=(15, 8))

sns.barplot(x='Experiment_ID', y='shunt_count', data=b1)
plt.axhline(7*20, color='k', linestyle='--')
plt.xlim(330.5, 405.5)
plt.ylim(0,400)
plt.xticks(rotation=30)


#b1.plot(x='Experiment_ID', y='shunt_count', kind='bar')
Out[58]:
(array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
         13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,
         26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,
         39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,
         52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63,  64,
         65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,
         78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,
         91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103,
        104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
        117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
        130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
        143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
        156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
        169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
        182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
        195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
        208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
        221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
        234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
        247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
        260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
        273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
        286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
        299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
        312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
        325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
        338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
        351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
        364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
        377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
        390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
        403, 404, 405, 406, 407, 408, 409, 410]),
 <a list of 411 Text xticklabel objects>)
In [59]:
plt.figure(figsize=(15, 8))
sns.barplot(x='Experiment_ID', y='shunt_count', data=b1)
plt.axhline(7*20, color='k', linestyle='--')
plt.xlim(200.5, 400.5)
plt.ylim(0,400)
Out[59]:
(0, 400)
In [60]:
#del groupedcells
#del groupedcells1

groupedcells = cell_trends.groupby(['Experiment_ID', 'POR'], as_index=False )
groupedcells = groupedcells.describe().unstack()
groupedcells1 = groupedcells.reset_index()
groupedcells1.head()
Out[60]:
index Experiment_ID Cell_Area_mm2 Cell_Count Cell_no Eff Efficiency FF FillFactor Isc_mA NumCells Pmp_fit_ratio Pmp_mW Roc_Ohm Rs_Ohm Rsc_Ohm Rsh_Ohm Temp_C Vmp_V Voc_V n percentEff percentFF cellVoc cellJsc cellRs cellRs_norm cellRsh cellRsh_norm shunt_count
count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max
0 0 368 256 0 256 256 256 256 256 368 588.485812 1.505314e+02 6.273 627.30 627.3 627.3 627.3 368 1 0 1 1 1 1 1 368 12.000000 6.642281 1 6 12 18 23 0 NaN NaN NaN NaN NaN NaN NaN 184 0.118582 0.027115 0.026300 0.110575 0.1302 0.136525 0.148900 0 NaN NaN NaN NaN NaN NaN NaN 184 0.630413 0.104214 0.303300 0.600525 0.679050 0.701825 0.743845 184 150.484939 5.936031 129.320000 146.952500 150.570000 153.6625 168.35000 0 NaN NaN NaN NaN NaN NaN NaN 161 0.993911 0.008820 0.9644 0.989400 0.99410 0.999100 1.0224 184 74.385099 17.013028 16.500000 69.375000 81.65 85.625 93.400000 184 0.890946 0.475543 0.533 0.64275 0.7490 0.879750 2.975000 322 0.398370 0.393988 0 0.16900 0.2900 0.46625 2.418 184 6085358.901740 7.382826e+07 16.100000 89.000000 127.600000 153.225000 1.000000e+09 322 6.088264e+16 7.382188e+17 13.7 123.025 173.75 2.668445e+04 1.273945e+19 368 28.352258 1.208248 25.91 27.3700 28.200000 29.404689 31.041384 184 0.579048 0.096554 0.219000 0.537525 0.62655 0.641415 0.687802 184 0.770373 0.078765 0.406200 0.743375 0.801850 0.816618 0.83060 322 3.060124 2.108376 1.42 2.0125 2.39 2.980 15.36 184 11.858217 2.711472 2.6300 11.057500 13.02 13.6525 14.8900 184 63.041343 10.421384 30.3300 60.052500 67.90500 70.1825 74.3845 184 0.770373 0.078765 0.406200 0.743375 0.801850 0.816618 0.83060 184 23.989310 0.946283 20.615336 23.426192 24.002869 24.495855 26.837239 322 0.398370 0.393988 0 0.16900 0.2900 0.46625 2.418 322 2.498972 2.471488 0 1.060137 1.819170 2.924786 15.168114 184 6085358.901740 7.382826e+07 16.100000 89.000000 127.600000 153.225000 1.000000e+09 184 3.817346e+07 4.631247e+08 100.995300 558.297000 800.434800 961.180425 6.273000e+09 26 1 0 1 1 1 1 1
1 1 382 256 0 256 256 256 256 256 382 457.903555 2.737436e+02 6.273 24.93 627.3 627.3 627.3 382 1 0 1 1 1 1 1 382 10.272251 7.297158 1 3 10 17 23 0 NaN NaN NaN NaN NaN NaN NaN 221 0.080979 0.057160 0.003100 0.008325 0.1020 0.137200 0.152799 0 NaN NaN NaN NaN NaN NaN NaN 221 0.467424 0.250893 0.005448 0.245040 0.588200 0.694700 0.736368 221 106.493791 65.297835 3.158914 3.393953 148.042018 154.4400 169.07000 0 NaN NaN NaN NaN NaN NaN NaN 115 0.997557 0.014931 0.9700 0.989500 0.99630 1.003450 1.1144 221 49.466770 37.585199 0.194600 0.209336 64.00 86.100 95.850586 221 79.589887 260.143149 0.469 0.71400 0.9080 79.574276 3154.671796 230 2.624578 7.528053 0 0.13925 0.2515 0.40500 49.282 221 9167449.193850 9.491071e+07 1.200000 43.871980 135.700000 213.327813 1.000000e+09 230 1.142068e+17 1.246946e+18 1.2 98.625 164.80 9.007105e+09 1.799856e+19 382 398.588280 858.693793 25.38 27.5575 28.709316 30.190000 2385.236600 221 0.411794 0.253658 0.047500 0.061234 0.50390 0.638600 0.674016 221 0.226980 1.152211 -11.161023 -0.250368 0.719279 0.813784 0.83522 229 3.567118 3.464055 0.28 2.0100 2.44 3.340 29.48 221 8.097910 5.715975 0.3100 0.832500 10.20 13.7200 15.2799 221 46.742353 25.089262 0.5448 24.504000 58.82000 69.4700 73.6368 221 0.226980 1.152211 -11.161023 -0.250368 0.719279 0.813784 0.83522 221 20.427662 5.139701 12.671135 13.550497 23.599875 24.619799 26.952017 230 2.624578 7.528053 0 0.13925 0.2515 0.40500 49.282 230 16.463979 47.223478 0 0.873515 1.577659 2.540565 309.145986 221 9167449.193850 9.491071e+07 1.200000 43.871980 135.700000 213.327813 1.000000e+09 221 5.750656e+07 5.953750e+08 7.527600 89.703900 275.208931 870.692400 6.273000e+09 58 1 0 1 1 1 1 1
2 2 372 257 0 257 257 257 257 257 372 620.822903 6.220980e+01 24.930 627.30 627.3 627.3 627.3 372 1 0 1 1 1 1 1 372 12.013441 6.633845 1 6 12 18 23 0 NaN NaN NaN NaN NaN NaN NaN 184 0.130514 0.008845 0.106000 0.124200 0.1313 0.137200 0.150700 0 NaN NaN NaN NaN NaN NaN NaN 184 0.671086 0.031234 0.586500 0.646000 0.671150 0.697300 0.727200 184 151.834076 4.386037 142.630000 148.780000 151.065000 154.3675 166.98000 0 NaN NaN NaN NaN NaN NaN NaN 184 0.993584 0.006135 0.9778 0.990025 0.99440 0.998100 1.0078 184 81.869565 5.549159 66.500000 77.925000 82.40 86.025 94.500000 184 0.692750 0.092551 0.533 0.62400 0.6895 0.737000 1.066000 372 2766.176344 39492.151283 0 0.20875 0.2655 0.31850 675922.051 184 21739306.567935 1.462284e+08 59.100000 119.200000 144.800000 162.125000 1.000000e+09 372 2.944173e+15 4.447956e+16 58.8 144.775 1036.00 1.788180e+09 8.178432e+17 372 28.103629 1.128068 25.53 27.2175 27.895000 29.092500 30.550000 184 0.617624 0.031295 0.534100 0.587850 0.62465 0.644950 0.668100 184 0.803138 0.022531 0.739000 0.780050 0.811750 0.821925 0.83590 372 2.391022 0.413320 1.65 2.0900 2.30 2.640 4.14 184 13.051359 0.884499 10.6000 12.420000 13.13 13.7200 15.0700 184 67.108587 3.123379 58.6500 64.600000 67.11500 69.7300 72.7200 184 0.803138 0.022531 0.739000 0.780050 0.811750 0.821925 0.83590 184 24.204380 0.699193 22.737127 23.717520 24.081779 24.608242 26.618843 372 2766.176344 39492.151283 0 0.20875 0.2655 0.31850 675922.051 372 691.385369 9845.268533 0 1.304784 1.662345 1.990109 168507.367314 184 21739306.567935 1.462284e+08 59.100000 119.200000 144.800000 162.125000 1.000000e+09 184 1.363707e+08 9.172907e+08 370.734300 747.741600 908.330400 1017.010125 6.273000e+09 0 NaN NaN NaN NaN NaN NaN NaN
3 3 368 258 0 258 258 258 258 258 368 627.300000 3.870615e-12 627.300 627.30 627.3 627.3 627.3 368 1 0 1 1 1 1 1 368 12.000000 6.642281 1 6 12 18 23 0 NaN NaN NaN NaN NaN NaN NaN 184 0.129047 0.013166 0.034600 0.124175 0.1329 0.136600 0.147900 0 NaN NaN NaN NaN NaN NaN NaN 184 0.663425 0.054516 0.244100 0.648700 0.683600 0.692850 0.720600 184 151.082935 2.660760 144.400000 149.417500 151.010000 152.5125 159.68000 0 NaN NaN NaN NaN NaN NaN NaN 184 0.994661 0.007113 0.9701 0.990575 0.99470 0.998875 1.0270 184 80.950000 8.261822 21.700000 77.900000 83.35 85.650 92.800000 184 0.710957 0.161196 0.018 0.62475 0.6570 0.727750 1.626000 368 0.277217 0.145476 0 0.19300 0.2880 0.37725 0.612 184 21739290.682065 1.462284e+08 0.000000 123.225000 144.050000 161.650000 1.000000e+09 368 4.431999e+16 6.287283e+17 0.0 140.625 199.65 3.233291e+09 1.164490e+19 368 28.183288 1.182675 25.39 27.2975 28.045000 29.165000 30.520000 184 0.616878 0.037793 0.290200 0.604175 0.62660 0.637225 0.662800 184 0.805804 0.022716 0.587500 0.801125 0.810350 0.816875 0.82980 368 135.884022 2556.217442 1.81 2.0700 2.30 2.645 49039.38 184 12.904674 1.316588 3.4600 12.417500 13.29 13.6600 14.7900 184 66.342500 5.451609 24.4100 64.870000 68.36000 69.2850 72.0600 184 0.805804 0.022716 0.587500 0.801125 0.810350 0.816875 0.82980 184 24.084638 0.424161 23.019289 23.819146 24.073011 24.312530 25.455125 368 0.277217 0.145476 0 0.19300 0.2880 0.37725 0.612 368 1.738985 0.912572 0 1.210689 1.806624 2.366489 3.839076 184 21739290.682065 1.462284e+08 0.000000 123.225000 144.050000 161.650000 1.000000e+09 184 1.363706e+08 9.172907e+08 0.000000 772.990425 903.625650 1014.030450 6.273000e+09 6 1 0 1 1 1 1 1
4 4 460 259 0 259 259 259 259 259 460 503.094600 2.486813e+02 6.273 627.30 627.3 627.3 627.3 460 1 0 1 1 1 1 1 460 12.000000 6.640471 1 6 12 18 23 0 NaN NaN NaN NaN NaN NaN NaN 230 0.117905 0.024860 0.006454 0.113695 0.1288 0.134050 0.147600 0 NaN NaN NaN NaN NaN NaN NaN 230 0.639222 0.074949 0.250985 0.624622 0.668022 0.686425 0.720500 230 148.810972 5.505934 124.756396 146.769122 149.785000 152.2175 161.85488 0 NaN NaN NaN NaN NaN NaN NaN 138 0.994491 0.006548 0.9810 0.990000 0.99465 0.999975 1.0135 230 73.959233 15.594477 4.048477 71.350102 80.80 84.075 92.600000 230 0.873910 0.265923 0.524 0.67800 0.7695 1.006978 2.331050 276 0.343612 0.223784 0 0.20775 0.3070 0.47300 1.062 230 21739339.795592 1.461485e+08 1.018428 64.496746 123.887334 154.025000 1.000000e+09 276 7.061593e+15 5.620285e+16 31.8 132.100 215.20 2.658501e+10 6.054881e+17 460 28.563831 1.113975 25.41 27.9100 28.292868 29.459491 30.954049 230 0.578576 0.091965 0.070107 0.585761 0.61850 0.633750 0.659900 230 0.765876 0.090430 0.129295 0.773312 0.808300 0.816574 0.82840 276 2.531087 0.756680 1.81 2.0700 2.32 2.735 7.40 230 11.790480 2.486036 0.6454 11.369525 12.88 13.4050 14.7600 230 63.922170 7.494902 25.0985 62.462225 66.80215 68.6425 72.0500 230 0.765876 0.090430 0.129295 0.773312 0.808300 0.816574 0.82840 230 23.722457 0.877719 19.887836 23.396959 23.877730 24.265503 25.801830 276 0.343612 0.223784 0 0.20775 0.3070 0.47300 1.062 276 2.155480 1.403800 0 1.303216 1.925811 2.967129 6.661926 230 21739339.795592 1.461485e+08 1.018428 64.496746 123.887334 154.025000 1.000000e+09 230 1.363709e+08 9.167899e+08 6.388599 404.588088 777.145249 966.198825 6.273000e+09 49 1 0 1 1 1 1 1
In [61]:
ma = Series.rolling(celldf.percentEff, center=False,window=30).mean()
mstd = pd.rolling_std(celldf.percentEff, 30)

plt.figure()


plt.plot(celldf.index, celldf.percentEff, 'k')
plt.plot(ma.index, ma, 'b')
plt.fill_between(mstd.index, ma-2*mstd, ma+2*mstd, color='b', alpha=0.2)
plt.xlim(500,660)
plt.ylim(0,25)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-61-1fc8ea9bca62> in <module>()
----> 1 ma = Series.rolling(celldf.percentEff, center=False,window=30).mean()
      2 mstd = pd.rolling_std(celldf.percentEff, 30)
      3 
      4 plt.figure()
      5 

NameError: name 'Series' is not defined
In [ ]: